$().ready(function(){
        //设计所人员列表
		  $("#gridTableShejis").jqGrid({
			url:common_basePath+'junyansAction!queryJunyansShejis.action?junyansid='+$("#junyansid").val(),
			datatype: "json",
			height: 150,
			width: 720, 
			colNames:['主键','姓名','性别','职称','职务','科室','用户ID'],
			colModel:[
				{name:'ID',index:'ID', width:70,key:true,hidden:true}, 
				{name:'USERNAME',index:'USERNAME', width:100}, 
				{name:'SEX',index:'SEX', width:100,
				   formatter:function(cellvalue, options, rowObject) {
				       if (cellvalue==1){
				       	return "男";
				       }        
				       else{
				       	return "女";
				       }
				 }}, 
				{name:'ZHICHENGNAME',index:'ZHICHENGNAME', width:100}, 
				{name:'ZHIWUNAME',index:'ZHIWUNAME', width:100}, 
				{name:'ORG_NO',index:'ORG_NO', width:100},
				{name:'USERID',index:'USERID', width:100,hidden:true}
			],   
			shrinkToFit:false,
			sortname:'ID',
			sortorder:'asc',
			viewrecords:true,
			multiselect: true, // 是否显示复选框
			multiboxonly : true, 
			rownumbers: false,//显示行号
		    cellEdit: false,
			forceFit : true, 
			rowNum:200,
			mtype: "POST", 
			rowList:[15,20,50,200,500],
			toolbar: [false,"top"],
			jsonReader: {
				root:"rows",		// 数据行（默认为：rows）
				page: "page",  	// 当前页
				total: "total",  // 总页数
				records: "records",  // 总记录数
				repeatitems : false		// 设置成false，在后台设置值的时候，可以乱序。且并非每个值都得设
			},
			prmNames:{rows:"rows",page:"page",sort:"sidx",order:"sord",search:"search"},
			pager:"#gridPagerShejis",
			caption: "设计室人员列表"
		});
		jQuery("#gridTableShejis").jqGrid('navGrid','#gridPagerShejis',{add:false,edit:false,del:false,search:false,refresh:false});	 
        
        //测试项目
		$("#gridTableItem").jqGrid({
			url:common_basePath+'junyansAction!queryJunyansItem.action?junyansid='+$("#junyansid").val(),
			datatype: "json",
			height: 150,
			width: 720, 
			colNames:['ID','项目名称','标准要求','单位','设备要求'],
			colModel:[
				{name:'ID',index:'ID', width:70,key:true,hidden:true}, 
				{name:'XIANGMUMC',index:'XIANGMUMC', width:180}, 
				{name:'BIAOZUNYQ',index:'BIAOZUNYQ', width:100}, 
				{name:'DANWEI',index:'DANWEI', width:100}, 
				{name:'SHEBEIYQ',index:'SHEBEIYQ', width:100}
			],  
			shrinkToFit:false,
			sortname:'ID',
			sortorder:'asc',
			viewrecords:true,
			multiselect: true, // 是否显示复选框
			multiboxonly : true, 
			rownumbers: false,//显示行号
			rowNum:200,
			mtype: "POST", 
			rowList:[15,20,50,200,500],
			toolbar: [false,"top"],
			jsonReader: {
				root:"rows",		// 数据行（默认为：rows）
				page: "page",  	// 当前页
				total: "total",  // 总页数
				records: "records",  // 总记录数
				repeatitems : false		// 设置成false，在后台设置值的时候，可以乱序。且并非每个值都得设
			},
			prmNames:{rows:"rows",page:"page",sort:"sidx",order:"sord",search:"search"},
			pager:"#gridPagerItem",
			caption: "测试项目列表"
		});
		jQuery("#gridTableItem").jqGrid('navGrid','#gridPagerItem',{add:false,edit:false,del:false,search:false,refresh:false});	 
});


function backflow(){
   		var backnode = window.showModalDialog(common_basePath+'junyans/flowdahui.jsp?taskinfoid='+$("#taskinfoid").val(),null,"dialogWidth=500px;dialogHeight=300px;resizable=yes;scroll=yes");
   		if (backnode!=undefined&&backnode!=''){
   			var params = {
				"backnode": backnode,
				"taskinfoid":$("#taskinfoid").val(),
				"flowtaskid":$("#flowtaskid").val()
				};  
   			var actionUrl = common_basePath+"junyansAction!backFlow.action";  
			$.ajax({  
				  url : actionUrl,  
			      type : "post", 
			      data : params,  
			      dataType : "json",  
			      cache : false,  
			      error : function(textStatus, errorThrown) {  
			          alert("系统ajax交互错误: " + textStatus.value);  
			      },  
			      success : function(data, textStatus) {
			      	if(data.result=='success'){
			      		alert("打回成功！"); 
			      		W.gridSearch();      
			      		api.close();
			      	}else{
			      		alert("打回失败！");
			      	}
			    }  
			});
   		}
   }
	